package com.mavendemo.controller;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import com.mavendemo.dto.Student;

@RestController
@ComponentScan(basePackages = { "com.zhangliang.demo.controller" })
public class HomeController {

	@RequestMapping("/hello")
	public String hello() {
		return "Hello, SpringBoot!";
	}

	@ResponseBody
	@RequestMapping("/hellojson")
	public Student hellojson() {
		Student student = new Student();
		student.setId("ss");
		student.setAge("ss");
		student.setAddress("ss");
		return student;
	}
}
